home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / rexx / usebracket.avm < prev    next >
Text File  |  1995-03-09  |  608b  |  34 lines

  1. /* */
  2. parse upper arg server commandToDo otherargs
  3.  
  4. /* select the server */
  5. address value server
  6.  
  7. /* use the server */
  8. 'use'
  9. /* use failed, then someone else is using the server, and we shouldn't
  10.     continue */
  11. if rc ~= 0 then exit
  12.  
  13. 'requiredevice' 'telephoneline'
  14.  
  15. avmbusy = getclip('AVMBusy')
  16. if avmbusy = "" then call setclip('AVMBusy', '1')
  17. else call setclip('AVMBusy', avmbusy + 1)
  18.  
  19. /* run the command */
  20. address rexx commandToDo otherargs
  21.  
  22. /* voice mode */
  23. 'requiremode' 'voice'
  24.  
  25. 'flushphonebuffer'
  26.  
  27. avmbusy = getclip('AVMBusy')
  28. call setclip('AVMBusy', avmbusy - 1)
  29.  
  30. /* unuse the server */
  31. 'unuse'
  32. exit
  33.  
  34.